<?php 
	if ($fillter) {
		if (GoodsAgentRelated::isAgented($provider->id, $goods->id, Yii::app()->adminUser->id))
			echo '已代理';
		else 
			echo CHtml::button('代理商品',array(
				'class' => 'bh-ly-yw-center-jjingqu-sub bh-mlt50 bh-href',
				'href' =>Yii::app()->controller->createUrl('agentGoods',array('id'=>$goods->id,'uid'=>$provider->id)),
			));
	}
?>
